package za.co.smartmi.dao;

import za.co.smartmi.model.SystemUser;
import za.co.smartmi.model.SystemUserPk;
import za.co.smartmi.dao.exceptions.SystemUserDaoException;
import java.util.Date;
import java.util.List;
import za.co.smartmi.dao.support.JdbcDao;

public interface SystemUserDao extends JdbcDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return SystemUserPk
	 */
	public SystemUserPk insert(SystemUser dto);

	/** 
	 * Updates a single row in the system_user table.
	 */
	public void update(SystemUserPk pk, SystemUser dto) throws SystemUserDaoException;

	/** 
	 * Deletes a single row in the system_user table.
	 */
	public void delete(SystemUserPk pk) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'username = :username'.
	 */
	public SystemUser findByPrimaryKey(String username) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria ''.
	 */
	public List<SystemUser> findAll() throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'username = :username'.
	 */
	public List<SystemUser> findWhereUsernameEquals(String username) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'password = :password'.
	 */
	public List<SystemUser> findWherePasswordEquals(String password) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'status = :status'.
	 */
	public List<SystemUser> findWhereStatusEquals(String status) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'startdate = :startdate'.
	 */
	public List<SystemUser> findWhereStartdateEquals(Date startdate) throws SystemUserDaoException;

	/** 
	 * Returns all rows from the system_user table that match the criteria 'lastlogindate = :lastlogindate'.
	 */
	public List<SystemUser> findWhereLastlogindateEquals(Date lastlogindate) throws SystemUserDaoException;

	/** 
	 * Returns the rows from the system_user table that matches the specified primary-key value.
	 */
	public SystemUser findByPrimaryKey(SystemUserPk pk) throws SystemUserDaoException;

}
